const Koa = require('koa')
const app = new Koa()
const userRouter = require('../router/user.router')
const authRouter = require('../router/auth.router')
const bodyParser = require('koa-bodyparser')
const errorHandle =  require('./error-handler')
const userRoutes = require('../router')

app.use(bodyParser())
userRoutes(app)
app.on('error', errorHandle)

module.exports = app

